package hermesV3.services.TupleSpace.examples;

import hermesV3.services.TupleSpace.Tuple;
import hermesV3.services.TupleSpace.TupleException;



/**

 * @author Ambruoso Luigi
 * @author Addeo Vincenzo
 * 
 */

public class Contatto extends Tuple{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1939464603547699149L;
	public static String CONTATTO="Contatto";
	public static String NOME="Nome";
	public static String COGNOME="Cognome";
	
	public Contatto() {
		super();
		this.addKey(CONTATTO);
		
		try {
			this.addField(NOME, null);
			this.addField(COGNOME, null);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
		
		
	}
	public void setNome(String n){
		try {
			this.setField(NOME, n);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
	}
	public String getNome() {
		String s=null;
		try {
			s= (String) this.getField(NOME);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
		return s;
		
	}
	public void setCognome(String n){
		try {
			this.setField(COGNOME, n);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
	}
	public String getCognome(){
		String s=null;
		try {
			s= (String) this.getField(COGNOME);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
		return s;
	}

}
